#ifndef __CORE_MAIN_H__
#define __CORE_MAIN_H__

#define MAX_VCPU	255

//if AUTO_FIXING_TS_LOGIC is defined, vsa will fixing the relationship of
//blocking -- waking relation between the time slices.
#define AUTO_FIXING_TS_LOGIC	1

// define the schedule in types
enum{
	SCHED_IN_NORMAL=0,
	SCHED_IN_WAKE
} sched_in_types;

enum{
	SCHED_OUT_NORMAL=100,
	SCHED_OUT_BLOCK,
	SCHED_OUT_YIELD,
	SCHED_OUT_PREEMPT
} sched_out_types;

void core_init();
void core_exit();

int insert_time_slice( unsigned dom_id, unsigned vcpu_id, struct time_slice* );

struct domain* find_domain_by_id( unsigned int dom_id );
struct vcpu* find_vcpu_by_id( struct domain* pdom, unsigned int vcpu_id );
void add_time_slice( struct vcpu* pvcpu, struct time_slice * ptime_slice );

void print_one_time_slice(struct time_slice* ptime_slice, char* prefix);

int verify_core_data( void );
void brief_core_data( void );
void browse_core_data( void );
void reclaim_core_data( void );
void test_add_time_slices( void );


#endif

